<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Demo22</title>
  <script src="js/vue.js"></script>
</head>
<body>
<div id="app"></div>
</body>
<script>
  const app = Vue.createApp({
    data() {
      return {
        name: '',
        checked:true,
        girls:["刘英"]
      }
    },
    template: `
      <div>
      <div>{{ name }}</div>
<!--      数据绑定 lazy 是等失去焦点-->
      <input v-model.trim="name"/>
      <div><textarea v-model.lazy="name" /></div>
     checked:{{checked}} <input type="checkbox" v-model="checked" />
      <div>
        {{girls}}<br>
        大脚<input type="checkbox" v-model="girls" value="大脚" />
        刘英<input type="checkbox" v-model="girls" value="刘英" />
        晓红<input type="checkbox" v-model="girls" value="晓红" />
      </div>
      </div>
    `
  })
  const vm = app.mount("#app")
</script>
</html>
